package com.wn.class30.service.impl;

import com.wn.class30.entity.JoinImgMeal;
import com.wn.class30.mapper.JoinImgMealDao;
import com.wn.class30.service.JoinImgMealService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class JoinImgMealServiceImpl implements JoinImgMealService {
    @Resource
    private JoinImgMealDao joinImgMealDao;
    @Override
    public List<JoinImgMeal> selectJoinImgMeals() throws Exception {
        return joinImgMealDao.selectByExample(null);
    }

    @Override
    public void deleteImgMeals() throws Exception {
        joinImgMealDao.deleteByExample(null);
    }

    @Override
    public void insertImgMeal(JoinImgMeal joinImgMeal) throws Exception {
        joinImgMealDao.insert(joinImgMeal);
    }
}
